package edu.whut.mall.user.service;



import edu.whut.mall.common.enums.AccountType;
import edu.whut.mall.common.enums.WxTradeType;
import edu.whut.mall.common.dto.WxPayAccount;


import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * Author: smq
 * Unit: D9lab
 * Date: 2021-07-03 11:22
 * Description:
 */
public interface IPayService {

   //新模式的支付确认接口
   Integer confirmPayStatus(String outTradeNo);

   //获取当前的商户账号，默认为嫦娥抗衰商户账号
   WxPayAccount getWxPayAccount();

   //通过商户类型获取特定的商户账号
   WxPayAccount getWxPayAccount(AccountType accountType);

    // 获取退款账户，先不用
//   WxPayAccount getWithdrawAccount();
   //通过商户类型获取特定的商户账号
//   WxPayAccount getWithdrawAccount(AccountType accountType);


    // 退款接口先搁置不写

    Integer orderRefund(Integer user, String clinetIp, String outTradeNo, Double refundFee, Double totalFee) throws Exception;
//    WeixinReturnInfo withdraw(String openId, Double money, String description, WxPayAccount wxPayAccount, Integer type)throws Exception;
    Integer refund(int userId, String outTradeNo, String clientIP) throws Exception;
//    @NotNull
//    String refundQuery(String outTradeNo);

    //零钱体现先不写
//    Integer companyToChange(String openId, Double money, String description, WxPayAccount wxPayAccount, Integer type);


    String orderQuery(String outTradeNo) throws Exception;

    String prePay(HttpServletRequest request, Integer userId, String openid, Integer tradeId, int type, WxTradeType wxTradeType) throws Exception;

    Map unifiedOrderNew(String openId, String clientIp, String productName, String orderNumber, String randomNonceStr, double money, int flag, WxTradeType wxTradeType) throws Exception;
}
